package com.atguigu.lease.common.utils;

import java.util.Random;

/*
 * 生成验证码的工具类
 */
public class VerifyCodeUtil {
    public static String generateVerifyCode(int len) {
        StringBuilder verifyCode = new StringBuilder(len);
        for (int i = 0; i < len; i++) {
            verifyCode.append(new Random().nextInt(10));
        }
        return verifyCode.toString();
    }
}
